﻿<Window x:Class="DemoApp.PopupWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Service" 
        SizeToContent="WidthAndHeight"
        WindowStartupLocation="CenterOwner"
        x:Name="theView">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ContentControl Grid.Row="0"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        Content="{Binding ElementName=theView, Path=DataContext}" />
        <StackPanel Grid.Row="1"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right">
            <Button Content="Ok"
                    Click="Ok_Click"
                    Margin="5"
                    Width="100"
                    Height="30" />
            <Button Content="Cancel"
                    IsCancel="True"
                    Margin="5"
                    Width="100"
                    Height="30" />
        </StackPanel>
    </Grid>


</Window>
